file( GLOB_RECURSE SOURCES "*.*" )
add_executable( "Tests.FrameGraph" ${SOURCES} )
source_group( TREE ${CMAKE_CURRENT_SOURCE_DIR} FILES ${SOURCES} )
set_property( TARGET "Tests.FrameGraph" PROPERTY FOLDER "Tests" )

target_include_directories( "Tests.FrameGraph" PRIVATE "../../framegraph/Vulkan" )
target_include_directories( "Tests.FrameGraph" PRIVATE "../../framegraph/Vulkan/Buffer" )
target_include_directories( "Tests.FrameGraph" PRIVATE "../../framegraph/Vulkan/CommandBuffer" )
target_include_directories( "Tests.FrameGraph" PRIVATE "../../framegraph/Vulkan/Debugger" )
target_include_directories( "Tests.FrameGraph" PRIVATE "../../framegraph/Vulkan/Descriptors" )
target_include_directories( "Tests.FrameGraph" PRIVATE "../../framegraph/Vulkan/Image" )
target_include_directories( "Tests.FrameGraph" PRIVATE "../../framegraph/Vulkan/Instance" )
target_include_directories( "Tests.FrameGraph" PRIVATE "../../framegraph/Vulkan/Memory" )
target_include_directories( "Tests.FrameGraph" PRIVATE "../../framegraph/Vulkan/Pipeline" )
target_include_directories( "Tests.FrameGraph" PRIVATE "../../framegraph/Vulkan/RenderPass" )
target_include_directories( "Tests.FrameGraph" PRIVATE "../../framegraph/Vulkan/RayTracing" )
target_include_directories( "Tests.FrameGraph" PRIVATE "../../framegraph/Vulkan/Swapchain" )
target_include_directories( "Tests.FrameGraph" PRIVATE "../../framegraph/Vulkan/Utils" )

target_compile_definitions( "Tests.FrameGraph" PUBLIC "FG_TEST_GRAPHS_DIR=\"${CMAKE_CURRENT_SOURCE_DIR}/Graphs\"" )
target_compile_definitions( "Tests.FrameGraph" PUBLIC "FG_TEST_DUMPS_DIR=\"${CMAKE_CURRENT_SOURCE_DIR}/Dumps\"" )

target_link_libraries( "Tests.FrameGraph" "FrameGraph" )
target_link_libraries( "Tests.FrameGraph" "Framework" )

if (${FG_ENABLE_GRAPHVIZ})
	target_link_libraries( "Tests.FrameGraph" "GraphViz" )
endif()
target_link_libraries( "Tests.FrameGraph" "PipelineCompiler" )
if (${FG_ENABLE_LODEPNG})
	target_link_libraries( "Tests.FrameGraph" "lodepng-lib" )
endif()

if (NOT FG_CI_BUILD)
	add_test( NAME "Tests.FrameGraph" COMMAND "Tests.FrameGraph" )
endif ()
